<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<x:parse xml="${param.xmlstr}" var="xmlData" />
<c:set var="grant_code"><x:out select="$xmlData/data/proposal/grant_code" /></c:set>
<c:set var="sub_grant_code"><x:out select="$xmlData/data/proposal/sub_grant_code" /></c:set>

<div class="t_bar">经费筹集情况（单位：万元）</div>
<table class="table01 t_css" width="100%" border="0" cellpadding="0"
	cellspacing="1">
	<tr>
	    <td width="111" align="right"><span class="color_red">*</span>总投入经费：</td>
		<td colspan="8">
			<input id="invest_total" name="budget/invest_detail/total" label="总投入经费" type="text" disabled
					class="input_text required maxlength:20 gray"  style="text-align:right;width:200px;" maxlength="50" onfocus="InitInput.setNumber(this,7,4,4)"
					value="<x:out select="$xmlData/data/budget/invest_detail/total" />" /> 
		</td>
	</tr>
	<tr>
		<th rowspan="2" width="10%">&nbsp;</th>
		<th rowspan="2" width="10%">自有资金</th>
		<th rowspan="2" width="10%">贷款</th>
		<th rowspan="2" width="10%">境外资金</th>
		<th colspan="3" width="30%">政府部门</th>
		<th rowspan="2" width="10%">其他</th>
		<th rowspan="2" width="10%">合计</th>
	</tr>
	<tr>
	    <th>省科技厅</th>
		<th>市县配套</th>
		<th>其它部门</th>
	</tr>
	<tr>
	    <td align="center">
		           已投入经费
		</td>
		<td align="center">
		    <input name="budget/invest_detail/invest_has/own" id="invest_has_own" type="text" label="已投入经费中的自有资金" class=" input_text required maxlength:20" style="text-align:right;width:75px" value="<x:out select="$xmlData/data/budget/invest_detail/invest_has/own" />"  
		     onfocus="InitInput.setNumber(this,7,4,4)"
		     onchange="countNum1('invest_has_','own,loan,outside,province,city,otherdepartment,other','total');
		     countNum1('invest_','has_total,new_total','total');"/>
		</td>
		<td align="center">
		    <input name="budget/invest_detail/invest_has/loan" id="invest_has_loan" type="text" label="已投入经费中的贷款" class=" input_text required maxlength:20" style="text-align:right;width:75px" value="<x:out select="$xmlData/data/budget/invest_detail/invest_has/loan" />" 
		    onfocus="InitInput.setNumber(this,7,4,4)"
		    onchange="countNum1('invest_has_','own,loan,outside,province,city,otherdepartment,other','total');
            countNum1('invest_','has_total,new_total','total');"/>
		</td>
		<td align="center">
		    <input name="budget/invest_detail/invest_has/outside" id="invest_has_outside" type="text" label="已投入经费中的境外资金" class=" input_text required maxlength:20" style="text-align:right;width:75px" value="<x:out select="$xmlData/data/budget/invest_detail/invest_has/outside" />"
		     onfocus="InitInput.setNumber(this,7,4,4)"
		     onchange="countNum1('invest_has_','own,loan,outside,province,city,otherdepartment,other','total');
             countNum1('invest_','has_total,new_total','total');"/>
		</td>
		<td align="center">
		    <input name="budget/invest_detail/invest_has/province" id="invest_has_province" type="text" label="已投入经费中的省科技厅" class=" input_text required maxlength:20" style="text-align:right;width:75px" value="<x:out select="$xmlData/data/budget/invest_detail/invest_has/province" />" 
		    onfocus="InitInput.setNumber(this,7,4,4)"
		    onchange="countNum1('invest_has_','own,loan,outside,province,city,otherdepartment,other','total');
             countNum1('invest_','has_total,new_total','total');"/>
		</td>
		<td align="center">
		    <input name="budget/invest_detail/invest_has/city" id="invest_has_city" type="text" label="已投入经费中的市县配套" class=" input_text required maxlength:20" style="text-align:right;width:75px" value="<x:out select="$xmlData/data/budget/invest_detail/invest_has/city" />"
		     onfocus="InitInput.setNumber(this,7,4,4)"
		     onchange="countNum1('invest_has_','own,loan,outside,province,city,otherdepartment,other','total');
             countNum1('invest_','has_total,new_total','total');"/>
		</td>
		<td align="center">
		    <input name="budget/invest_detail/invest_has/otherdepartment" id="invest_has_otherdepartment" type="text" label="已投入经费中的其它部门" class=" input_text required maxlength:20" style="text-align:right;width:75px" value="<x:out select="$xmlData/data/budget/invest_detail/invest_has/otherdepartment" />" 
		    onfocus="InitInput.setNumber(this,7,4,4)"
		    onchange="countNum1('invest_has_','own,loan,outside,province,city,otherdepartment,other','total');
             countNum1('invest_','has_total,new_total','total');"/>
		</td>
		<td align="center">
		    <input name="budget/invest_detail/invest_has/other" id="invest_has_other" type="text" label="已投入经费中的其它" class=" input_text required maxlength:20" style="text-align:right;width:75px" value="<x:out select="$xmlData/data/budget/invest_detail/invest_has/other" />"  
		    onfocus="InitInput.setNumber(this,7,4,4)"
		    onchange="countNum1('invest_has_','own,loan,outside,province,city,otherdepartment,other','total');
             countNum1('invest_','has_total,new_total','total');"/>
		</td>
		<td align="center">
		    <input name="budget/invest_detail/invest_has/total" id="invest_has_total" type="text" class="gray" disabled style="text-align:right;width:100px" value="<x:out select="$xmlData/data/budget/invest_detail/invest_has/total" />" 
		    onfocus="InitInput.setNumber(this,7,4,4)"/>
		</td>
	</tr>
	<tr>
	    <td align="center">
		           新增经费
		</td>
		<td align="center">
		    <input name="budget/invest_detail/invest_new/own" id="invest_new_own" type="text" label="新增经费中的自有资金" class=" input_text required maxlength:20" style="text-align:right;width:75px" value="<x:out select="$xmlData/data/budget/invest_detail/invest_new/own" />"  
		     onfocus="InitInput.setNumber(this,7,4,4)"
		     onchange="countNum1('invest_new_','own,loan,outside,province,city,otherdepartment,other','total');
             countNum1('invest_','has_total,new_total','total');"/>
		</td>
		<td align="center">
		    <input name="budget/invest_detail/invest_new/loan" id="invest_new_loan" type="text" label="新增经费中的贷款" class=" input_text required maxlength:20" style="text-align:right;width:75px" value="<x:out select="$xmlData/data/budget/invest_detail/invest_new/loan" />" 
		    onfocus="InitInput.setNumber(this,7,4,4)"
		    onchange="countNum1('invest_new_','own,loan,outside,province,city,otherdepartment,other','total');
             countNum1('invest_','has_total,new_total','total');"/>
		</td>
		<td align="center">
		    <input name="budget/invest_detail/invest_new/outside" id="invest_new_outside" type="text" label="新增经费中的境外资金" class=" input_text required maxlength:20" style="text-align:right;width:75px" value="<x:out select="$xmlData/data/budget/invest_detail/invest_new/outside" />"
		     onfocus="InitInput.setNumber(this,7,4,4)"
		     onchange="countNum1('invest_new_','own,loan,outside,province,city,otherdepartment,other','total');
             countNum1('invest_','has_total,new_total','total');"/>
		</td>
		<td align="center">
		    <input name="budget/invest_detail/invest_new/province" id="invest_new_province" type="text" label="新增经费中的省科技厅" class=" input_text required maxlength:20" style="text-align:right;width:75px" value="<x:out select="$xmlData/data/budget/invest_detail/invest_new/province" />" 
		    onfocus="InitInput.setNumber(this,7,4,4)"
		    onchange="countNum1('invest_new_','own,loan,outside,province,city,otherdepartment,other','total');
             countNum1('invest_','has_total,new_total','total');"/>
		</td>
		<td align="center">
		    <input name="budget/invest_detail/invest_new/city" id="invest_new_city" type="text" label="新增经费中的市县配套" class=" input_text required maxlength:20" style="text-align:right;width:75px" value="<x:out select="$xmlData/data/budget/invest_detail/invest_new/city" />"
		     onfocus="InitInput.setNumber(this,7,4,4)"
		     onchange="countNum1('invest_new_','own,loan,outside,province,city,otherdepartment,other','total');
             countNum1('invest_','has_total,new_total','total');"/>
		</td>
		<td align="center">
		    <input name="budget/invest_detail/invest_new/otherdepartment" id="invest_new_otherdepartment" type="text" label="新增经费中的其它部门" class=" input_text required maxlength:20" style="text-align:right;width:75px" value="<x:out select="$xmlData/data/budget/invest_detail/invest_new/otherdepartment" />" 
		    onfocus="InitInput.setNumber(this,7,4,4)"
		    onchange="countNum1('invest_new_','own,loan,outside,province,city,otherdepartment,other','total');
             countNum1('invest_','has_total,new_total','total');"/>
		</td>
		<td align="center">
		    <input name="budget/invest_detail/invest_new/other" id="invest_new_other" type="text" label="新增经费中的其它" class=" input_text required maxlength:20" style="text-align:right;width:75px" value="<x:out select="$xmlData/data/budget/invest_detail/invest_new/other" />"  
		    onfocus="InitInput.setNumber(this,7,4,4)"
		    onchange="countNum1('invest_new_','own,loan,outside,province,city,otherdepartment,other','total');
             countNum1('invest_','has_total,new_total','total');"/>
		</td>
		<td align="center">
		    <input name="budget/invest_detail/invest_new/total" id="invest_new_total" type="text" class="gray" disabled style="text-align:right;width:100px" value="<x:out select="$xmlData/data/budget/invest_detail/invest_new/total" />" 
		    onfocus="InitInput.setNumber(this,7,4,4)"/>
		</td>
	</tr>
	<tr>
	    <td align="right">政府部门、境外资金及其他资金投入情况说明：(限500字)</td>
		<td colspan="8">
			<textarea id="brief" name="budget/invest_detail/brief" rows=7 cols=100 class="maxlength:500"
				title="提示：政府部门、境外资金及其他资金投入情况说明等，500字以内"><x:out select="$xmlData/data/budget/invest_detail/brief" /></textarea>
		</td>
	</tr> 
</table>
<br>
<div class="t_bar">新增经费预算（单位：万元）</div>
<table class="t_css" width="100%" border="0" cellpadding="0"
	cellspacing="1">
	<tr class="t_tr">
		<td align="center" width="80">&nbsp;</td>
		<td class="TblHead" align="center" width="380" colspan="2">总经费</td>
		<td class="TblHead" align="center" width="380" colspan="2">省科技厅经费</td>
	</tr>
	<tr class="t_tr">
		<td align="center" width="220">支出经费</td>
		<td class="TblHead" align="center" width="100">经费额</td>
		<td class="TblHead" align="center" width="280">用途说明</td>
		<td class="TblHead" align="center" width="100">经费额</td>
		<td class="TblHead" align="center" width="280">用途说明</td>
	</tr>
	<tr class="li_1">
	    <td align="center">
	                      基建费
	    </td>
	    <td>
			<input type="hidden" name="budget/invest_detail/invest[00]@invest_code" value="00" />
			<input type="hidden" name="budget/invest_detail/invest[00]/name" value="基建费" />
			<input type="text" name="budget/invest_detail/invest[00]/total_invest" id="total_invest_0" 
					style="text-align:right;width:100px" 
					class="gray valueCompare:provincial_invest_0:total_invest_0" label="新增经费预算中总经费中的基建费" disabled
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='00']/total_invest" />"  
					onfocus="InitInput.setNumber(this,7,4,4)" 
					onchange="countFund('total_invest_','0,3,6,9,12','13');"  />
		</td>
		<td>
			<input type="text" name="budget/invest_detail/invest[00]/total_brief" 
			        style="width:280px"
					id="total_brief_0" 
					class="input_css required" label="基建费中总经费用途说明"  onfocus="InitInput.setMaxLength(this,50)" 
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='00']/total_brief" />"/>
		</td>
		<td>
			<input type="text" name="budget/invest_detail/invest[00]/provincial_invest" id="provincial_invest_0" 
					style="text-align:right;width:100px"
					class="gray" label="省科技厅经费中的基建费" disabled
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='00']/provincial_invest" />"  
					onfocus="InitInput.setNumber(this,7,4,4)" 
					onchange="countFund('provincial_invest_','0,3,6,9,12','13');"  />
		</td>
		<td>
			<input type="text" style="width:280px" name="budget/invest_detail/invest[00]/provincial_brief" 
					id="provincial_brief_0" 
					class="input_css required" label="基建费中省科技厅经费用途说明"  onfocus="InitInput.setMaxLength(this,50)" 
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='00']/provincial_brief" />"/>
		</td>
	</tr>
	<tr class="li_2">
	    <td align="center" rowspan="2">
	                      其中
	    </td>
	    <td>
			<input type="hidden" name="budget/invest_detail/invest[01]@invest_code" value="01" />
			<input type="hidden" name="budget/invest_detail/invest[01]/name" value="基建费的其中1" />
			<input type="text" name="budget/invest_detail/invest[01]/total_invest" id="total_invest_1" 
					style="text-align:right;width:100px" 
					class="" label="基建费的其中1总经费经费额" 
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='01']/total_invest" />"  
					onfocus="InitInput.setNumber(this,7,4,4)" 
					onchange="countFund('total_invest_','1,2','0');countFund('total_invest_','0,3,6,9,12','13');displayBrief('total_invest_1','total_brief_1')"  />
		</td>
		<td>
			<input type="text" name="budget/invest_detail/invest[01]/total_brief" 
			        style="width:280px"
					id="total_brief_1" 
					class="input_css gray" label="基建费的其中1总经费用途说明"  disabled onfocus="InitInput.setMaxLength(this,50)" 
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='01']/total_brief" />"/>
		</td>
		<td>
			<input type="text" name="budget/invest_detail/invest[01]/provincial_invest" id="provincial_invest_1" 
					style="text-align:right;width:100px"
					class="" label="基建费的其中1省科技厅经费经费额"  
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='01']/provincial_invest" />"  
					onfocus="InitInput.setNumber(this,7,4,4)" 
					onchange="countFund('provincial_invest_','1,2','0');countFund('provincial_invest_','0,3,6,9,12','13');displayBrief('provincial_invest_1','provincial_brief_1')"  />
		</td>
		<td>
			<input type="text" style="width:280px" name="budget/invest_detail/invest[01]/provincial_brief" 
					id="provincial_brief_1" 
					class="input_css gray" label="基建费的其中1省科技厅经费用途说明" disabled onfocus="InitInput.setMaxLength(this,50)" 
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='01']/provincial_brief" />"/>
		</td>
	</tr>
	<tr class="li_2">
	    <td>
			<input type="hidden" name="budget/invest_detail/invest[02]@invest_code" value="02" />
			<input type="hidden" name="budget/invest_detail/invest[02]/name" value="基建费的其中2" />
			<input type="text" name="budget/invest_detail/invest[02]/total_invest" id="total_invest_2" 
					style="text-align:right;width:100px" 
					class="" label="基建费的其中2总经费经费额" 
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='02']/total_invest" />"  
					onfocus="InitInput.setNumber(this,7,4,4)" 
					onchange="countFund('total_invest_','1,2','0');countFund('total_invest_','0,3,6,9,12','13');displayBrief('total_invest_2','total_brief_2')"  />
		</td>
		<td>
			<input type="text" name="budget/invest_detail/invest[02]/total_brief" 
			        style="width:280px"
					id="total_brief_2" 
					class="input_css gray" label="基建费的其中2总经费用途说明"  disabled onfocus="InitInput.setMaxLength(this,50)" 
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='02']/total_brief" />"/>
		</td>
		<td>
			<input type="text" name="budget/invest_detail/invest[02]/provincial_invest" id="provincial_invest_2" 
					style="text-align:right;width:100px"
					class="" label="基建费的其中2省科技厅经费经费额" 
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='02']/provincial_invest" />"  
					onfocus="InitInput.setNumber(this,7,4,4)" 
					onchange="countFund('provincial_invest_','1,2','0');countFund('provincial_invest_','0,3,6,9,12','13');displayBrief('provincial_invest_2','provincial_brief_2')"  />
		</td>
		<td>
			<input type="text" style="width:280px" name="budget/invest_detail/invest[02]/provincial_brief" 
					id="provincial_brief_2" 
					class="input_css gray" label="基建费的其中2省科技厅经费用途说明"  disabled onfocus="InitInput.setMaxLength(this,50)" 
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='02']/provincial_brief" />"/>
		</td>
	</tr>
	<tr class="li_1">
	    <td align="center">
	                      设备购置费
	    </td>
	    <td>
			<input type="hidden" name="budget/invest_detail/invest[03]@invest_code" value="03" />
			<input type="hidden" name="budget/invest_detail/invest[03]/name" value="设备购置费" />
			<input type="text" name="budget/invest_detail/invest[03]/total_invest" id="total_invest_3" 
					style="text-align:right;width:100px" 
					class="gray valueCompare:provincial_invest_3:total_invest_3" label="新增经费预算中总经费中的设备购置费"  disabled
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='03']/total_invest" />"  
					onfocus="InitInput.setNumber(this,7,4,4)" 
					onchange="countFund('total_invest_','0,3,6,9,12','13');"  />
		</td>
		<td>
			<input type="text" name="budget/invest_detail/invest[03]/total_brief" 
			        style="width:280px"
					id="total_brief_3" 
					class="input_css required" label="设备购置费中总经费用途说明"  onfocus="InitInput.setMaxLength(this,50)" 
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='03']/total_brief" />"/>
		</td>
		<td>
			<input type="text" name="budget/invest_detail/invest[03]/provincial_invest" id="provincial_invest_3" 
					style="text-align:right;width:100px"
					class="gray" label="省科技厅经费中的设备购置费"  disabled
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='03']/provincial_invest" />"  
					onfocus="InitInput.setNumber(this,7,4,4)" 
					onchange="countFund('provincial_invest_','0,3,6,9,12','13');"  />
		</td>
		<td>
			<input type="text" style="width:280px" name="budget/invest_detail/invest[03]/provincial_brief" 
					id="provincial_brief_3" 
					class="input_css required" label="设备购置费中省科技厅经费用途说明"  onfocus="InitInput.setMaxLength(this,50)" 
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='03']/provincial_brief" />"/>
		</td>
	</tr>
	<tr class="li_2">
	    <td align="center" rowspan="2">
	                      其中
	    </td>
	    <td>
			<input type="hidden" name="budget/invest_detail/invest[04]@invest_code" value="04" />
			<input type="hidden" name="budget/invest_detail/invest[04]/name" value="设备购置费的其中1" />
			<input type="text" name="budget/invest_detail/invest[04]/total_invest" id="total_invest_4" 
					style="text-align:right;width:100px" 
					class="" label="设备购置费的其中1总经费经费额" 
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='04']/total_invest" />"  
					onfocus="InitInput.setNumber(this,7,4,4)" 
					onchange="countFund('total_invest_','4,5','3');countFund('total_invest_','0,3,6,9,12','13');displayBrief('total_invest_4','total_brief_4')"  />
		</td>
		<td>
			<input type="text" name="budget/invest_detail/invest[04]/total_brief" 
			        style="width:280px"
					id="total_brief_4" 
					class="input_css gray" label="设备购置费的其中1总经费用途说明" disabled onfocus="InitInput.setMaxLength(this,50)" 
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='04']/total_brief" />"/>
		</td>
		<td>
			<input type="text" name="budget/invest_detail/invest[04]/provincial_invest" id="provincial_invest_4" 
					style="text-align:right;width:100px"
					class="" label="设备购置费的其中1省科技厅经费经费额" 
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='04']/provincial_invest" />"  
					onfocus="InitInput.setNumber(this,7,4,4)" 
					onchange="countFund('provincial_invest_','4,5','3');countFund('provincial_invest_','0,3,6,9,12','13');displayBrief('provincial_invest_4','provincial_brief_4')"  />
		</td>
		<td>
			<input type="text" style="width:280px" name="budget/invest_detail/invest[04]/provincial_brief" 
					id="provincial_brief_4" 
					class="input_css gray" label="设备购置费的其中1省科技厅经费用途说明" disabled onfocus="InitInput.setMaxLength(this,50)" 
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='04']/provincial_brief" />"/>
		</td>
	</tr>
	<tr class="li_2">
	    <td>
			<input type="hidden" name="budget/invest_detail/invest[05]@invest_code" value="05" />
			<input type="hidden" name="budget/invest_detail/invest[05]/name" value="设备购置费的其中2" />
			<input type="text" name="budget/invest_detail/invest[05]/total_invest" id="total_invest_5" 
					style="text-align:right;width:100px" 
					class="" label="设备购置费的其中2总经费经费额" 
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='05']/total_invest" />"  
					onfocus="InitInput.setNumber(this,7,4,4)" 
					onchange="countFund('total_invest_','4,5','3');countFund('total_invest_','0,3,6,9,12','13');displayBrief('total_invest_5','total_brief_5')"  />
		</td>
		<td>
			<input type="text" name="budget/invest_detail/invest[05]/total_brief" 
			        style="width:280px"
					id="total_brief_5" 
					class="input_css gray" label="设备购置费的其中2总经费用途说明" disabled onfocus="InitInput.setMaxLength(this,50)" 
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='05']/total_brief" />"/>
		</td>
		<td>
			<input type="text" name="budget/invest_detail/invest[05]/provincial_invest" id="provincial_invest_5" 
					style="text-align:right;width:100px"
					class="" label="设备购置费的其中2省科技厅经费经费额" 
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='05']/provincial_invest" />"  
					onfocus="InitInput.setNumber(this,7,4,4)" 
					onchange="countFund('provincial_invest_','4,5','3');countFund('provincial_invest_','0,3,6,9,12','13');displayBrief('provincial_invest_5','provincial_brief_5')"  />
		</td>
		<td>
			<input type="text" style="width:280px" name="budget/invest_detail/invest[05]/provincial_brief" 
					id="provincial_brief_5"  onfocus="InitInput.setMaxLength(this,50)" 
					class="input_css gray" label="设备购置费的其中2省科技厅经费用途说明" disabled
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='05']/provincial_brief" />"/>
		</td>
	</tr>
	<tr class="li_1">
	    <td align="center">
	                      专用业务费
	    </td>
	    <td>
			<input type="hidden" name="budget/invest_detail/invest[06]@invest_code" value="06" />
			<input type="hidden" name="budget/invest_detail/invest[06]/name" value="专用业务费" />
			<input type="text" name="budget/invest_detail/invest[06]/total_invest" id="total_invest_6" 
					style="text-align:right;width:100px" 
					class="gray valueCompare:provincial_invest_6:total_invest_6" label="新增经费预算中总经费中的专用业务费"  disabled
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='06']/total_invest" />"  
					onfocus="InitInput.setNumber(this,7,4,4)" 
					onchange="countFund('total_invest_','0,3,6,9,12','13');"  />
		</td>
		<td>
			<input type="text" name="budget/invest_detail/invest[06]/total_brief" 
			        style="width:280px"
					id="total_brief_6"  onfocus="InitInput.setMaxLength(this,50)" 
					class="input_css required" label="专用业务费中总经费用途说明" 
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='06']/total_brief" />"/>
		</td>
		<td>
			<input type="text" name="budget/invest_detail/invest[06]/provincial_invest" id="provincial_invest_6" 
					style="text-align:right;width:100px"
					class="gray" label="省科技厅经费中的专用业务费"  disabled
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='06']/provincial_invest" />"  
					onfocus="InitInput.setNumber(this,7,4,4)" 
					onchange="countFund('provincial_invest_','0,3,6,9,12','13');"  />
		</td>
		<td>
			<input type="text" style="width:280px" name="budget/invest_detail/invest[06]/provincial_brief" 
					id="provincial_brief_6"  onfocus="InitInput.setMaxLength(this,50)" 
					class="input_css required" label="专用业务费中省科技厅经费用途说明" 
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='06']/provincial_brief" />"/>
		</td>
	</tr>
	<tr class="li_2">
	    <td align="center" rowspan="2">
	                      其中
	    </td>
	    <td>
			<input type="hidden" name="budget/invest_detail/invest[07]@invest_code" value="07" />
			<input type="hidden" name="budget/invest_detail/invest[07]/name" value="专用业务费的其中1" />
			<input type="text" name="budget/invest_detail/invest[07]/total_invest" id="total_invest_7" 
					style="text-align:right;width:100px" 
					class="" label="专用业务费的其中1总经费经费额" 
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='07']/total_invest" />"  
					onfocus="InitInput.setNumber(this,7,4,4)" 
					onchange="countFund('total_invest_','7,8','6');countFund('total_invest_','0,3,6,9,12','13');displayBrief('total_invest_7','total_brief_7')"  />
		</td>
		<td>
			<input type="text" name="budget/invest_detail/invest[07]/total_brief" 
			        style="width:280px"
					id="total_brief_7"  onfocus="InitInput.setMaxLength(this,50)" 
					class="input_css gray" label="专用业务费的其中1总经费用途说明"  disabled
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='07']/total_brief" />"/>
		</td>
		<td>
			<input type="text" name="budget/invest_detail/invest[07]/provincial_invest" id="provincial_invest_7" 
					style="text-align:right;width:100px"
					class="" label="专用业务费的其中1省科技厅经费经费额" 
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='07']/provincial_invest" />"  
					onfocus="InitInput.setNumber(this,7,4,4)" 
					onchange="countFund('provincial_invest_','7,8','6');countFund('provincial_invest_','0,3,6,9,12','13');displayBrief('provincial_invest_7','provincial_brief_7')"  />
		</td>
		<td>
			<input type="text" style="width:280px" name="budget/invest_detail/invest[07]/provincial_brief" 
					id="provincial_brief_7"  onfocus="InitInput.setMaxLength(this,50)" 
					class="input_css gray" label="专用业务费的其中1省科技厅经费用途说明" disabled
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='07']/provincial_brief" />"/>
		</td>
	</tr>
	<tr class="li_2">
	    <td>
			<input type="hidden" name="budget/invest_detail/invest[08]@invest_code" value="08" />
			<input type="hidden" name="budget/invest_detail/invest[08]/name" value="专用业务费的其中2" />
			<input type="text" name="budget/invest_detail/invest[08]/total_invest" id="total_invest_8" 
					style="text-align:right;width:100px" 
					class="" label="专用业务费的其中2总经费经费额" 
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='08']/total_invest" />"  
					onfocus="InitInput.setNumber(this,7,4,4)" 
					onchange="countFund('total_invest_','7,8','6');countFund('total_invest_','0,3,6,9,12','13');displayBrief('total_invest_8','total_brief_8')"  />
		</td>
		<td>
			<input type="text" name="budget/invest_detail/invest[08]/total_brief" 
			        style="width:280px"
					id="total_brief_8"   onfocus="InitInput.setMaxLength(this,50)" 
					class="input_css gray" label="专用业务费的其中2总经费用途说明" disabled
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='08']/total_brief" />"/>
		</td>
		<td>
			<input type="text" name="budget/invest_detail/invest[08]/provincial_invest" id="provincial_invest_8" 
					style="text-align:right;width:100px"
					class="" label="专用业务费的其中2省科技厅经费经费额" 
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='08']/provincial_invest" />"  
					onfocus="InitInput.setNumber(this,7,4,4)" 
					onchange="countFund('provincial_invest_','7,8','6');countFund('provincial_invest_','0,3,6,9,12','13');displayBrief('provincial_invest_8','provincial_brief_8')"  />
		</td>
		<td>
			<input type="text" style="width:280px" name="budget/invest_detail/invest[08]/provincial_brief" 
					id="provincial_brief_8" onfocus="InitInput.setMaxLength(this,50)" 
					class="input_css gray" label="专用业务费的其中2省科技厅经费用途说明" disabled
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='08']/provincial_brief" />"/>
		</td>
	</tr>
	<tr class="li_1">
	    <td align="center">
	                      原材料费
	    </td>
	    <td>
			<input type="hidden" name="budget/invest_detail/invest[09]@invest_code" value="09" />
			<input type="hidden" name="budget/invest_detail/invest[09]/name" value="原材料费" />
			<input type="text" name="budget/invest_detail/invest[09]/total_invest" id="total_invest_9" 
					style="text-align:right;width:100px" 
					class="gray valueCompare:provincial_invest_9:total_invest_9" label="新增经费预算中总经费中的原材料费"  disabled
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='09']/total_invest" />"  
					onfocus="InitInput.setNumber(this,7,4,4)" 
					onchange="countFund('total_invest_','0,3,6,9,12','13');"  />
		</td>
		<td>
			<input type="text" name="budget/invest_detail/invest[09]/total_brief" 
			        style="width:280px"
					id="total_brief_9" onfocus="InitInput.setMaxLength(this,50)" 
					class="input_css required" label="原材料费中总经费用途说明" 
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='09']/total_brief" />"/>
		</td>
		<td>
			<input type="text" name="budget/invest_detail/invest[09]/provincial_invest" id="provincial_invest_9" 
					style="text-align:right;width:100px"
					class="gray" label="省科技厅经费中的原材料费"  disabled
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='09']/provincial_invest" />"  
					onfocus="InitInput.setNumber(this,7,4,4)" 
					onchange="countFund('provincial_invest_','0,3,6,9,12','13');"  />
		</td>
		<td>
			<input type="text" style="width:280px" name="budget/invest_detail/invest[09]/provincial_brief" 
					id="provincial_brief_9"  onfocus="InitInput.setMaxLength(this,50)" 
					class="input_css required" label="原材料费中省科技厅经费用途说明" 
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='09']/provincial_brief" />"/>
		</td>
	</tr>
	<tr class="li_2">
	    <td align="center" rowspan="2">
	                      其中
	    </td>
	    <td>
			<input type="hidden" name="budget/invest_detail/invest[10]@invest_code" value="10" />
			<input type="hidden" name="budget/invest_detail/invest[10]/name" value="原材料费的其中1" />
			<input type="text" name="budget/invest_detail/invest[10]/total_invest" id="total_invest_10" 
					style="text-align:right;width:100px" 
					class="" label="原材料费的其中1总经费经费额" 
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='10']/total_invest" />"  
					onfocus="InitInput.setNumber(this,7,4,4)" 
					onchange="countFund('total_invest_','10,11','9');countFund('total_invest_','0,3,6,9,12','13');displayBrief('total_invest_10','total_brief_10')"  />
		</td>
		<td>
			<input type="text" name="budget/invest_detail/invest[10]/total_brief" 
			        style="width:280px"
					id="total_brief_10"  onfocus="InitInput.setMaxLength(this,50)" 
					class="input_css gray" label="原材料费的其中1总经费用途说明" disabled
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='10']/total_brief" />"/>
		</td>
		<td>
			<input type="text" name="budget/invest_detail/invest[10]/provincial_invest" id="provincial_invest_10" 
					style="text-align:right;width:100px"
					class="" label="原材料费的其中1省科技厅经费经费额" 
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='10']/provincial_invest" />"  
					onfocus="InitInput.setNumber(this,7,4,4)" 
					onchange="countFund('provincial_invest_','10,11','9');countFund('provincial_invest_','0,3,6,9,12','13');displayBrief('provincial_invest_10','provincial_brief_10')"  />
		</td>
		<td>
			<input type="text" style="width:280px" name="budget/invest_detail/invest[10]/provincial_brief" 
					id="provincial_brief_10"  onfocus="InitInput.setMaxLength(this,50)" 
					class="input_css gray" label="原材料费的其中1省科技厅经费用途说明" disabled
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='10']/provincial_brief" />"/>
		</td>
	</tr>
	<tr class="li_2">
	    <td>
			<input type="hidden" name="budget/invest_detail/invest[11]@invest_code" value="11" />
			<input type="hidden" name="budget/invest_detail/invest[11]/name" value="原材料费的其中2" />
			<input type="text" name="budget/invest_detail/invest[11]/total_invest" id="total_invest_11" 
					style="text-align:right;width:100px" 
					class="" label="原材料费的其中2总经费经费额" 
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='11']/total_invest" />"  
					onfocus="InitInput.setNumber(this,7,4,4)" 
					onchange="countFund('total_invest_','10,11','9');countFund('total_invest_','0,3,6,9,12','13');displayBrief('total_invest_11','total_brief_11')"  />
		</td>
		<td>
			<input type="text" name="budget/invest_detail/invest[11]/total_brief" 
			        style="width:280px"
					id="total_brief_11"  onfocus="InitInput.setMaxLength(this,50)" 
					class="input_css gray" label="原材料费的其中2总经费用途说明" disabled
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='11']/total_brief" />"/>
		</td>
		<td>
			<input type="text" name="budget/invest_detail/invest[11]/provincial_invest" id="provincial_invest_11" 
					style="text-align:right;width:100px"
					class="" label="原材料费的其中2省科技厅经费经费额" 
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='11']/provincial_invest" />"  
					onfocus="InitInput.setNumber(this,7,4,4)" 
					onchange="countFund('provincial_invest_','10,11','9');countFund('provincial_invest_','0,3,6,9,12','13');displayBrief('provincial_invest_11','provincial_brief_11')"  />
		</td>
		<td>
			<input type="text" style="width:280px" name="budget/invest_detail/invest[11]/provincial_brief" 
					id="provincial_brief_11" onfocus="InitInput.setMaxLength(this,50)" 
					class="input_css gray" label="原材料费的其中2省科技厅经费用途说明" disabled
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='11']/provincial_brief" />"/>
		</td>
	</tr>
	<tr class="li_1">
	    <td align="center">
	                      其它
	    </td>
	    <td>
			<input type="hidden" name="budget/invest_detail/invest[12]@invest_code" value="12" />
			<input type="hidden" name="budget/invest_detail/invest[12]/name" value="其它" />
			<input type="text" name="budget/invest_detail/invest[12]/total_invest" id="total_invest_12" 
					style="text-align:right;width:100px" 
					class="valueCompare:provincial_invest_12:total_invest_12" label="新增经费预算中总经费中的其它" 
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='12']/total_invest" />"  
					onfocus="InitInput.setNumber(this,7,4,4)" 
					onchange="countFund('total_invest_','0,3,6,9,12','13');"  />
		</td>
		<td>
			<input type="text" name="budget/invest_detail/invest[12]/total_brief" 
			        style="width:280px"
					id="total_brief_12"  onfocus="InitInput.setMaxLength(this,50)" 
					class="input_css required" label="其它中总经费用途说明" 
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='12']/total_brief" />"/>
		</td>
		<td>
			<input type="text" name="budget/invest_detail/invest[12]/provincial_invest" id="provincial_invest_12" 
					style="text-align:right;width:100px"
					class="" label="省科技厅经费中的其它" 
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='12']/provincial_invest" />"  
					onfocus="InitInput.setNumber(this,7,4,4)" 
					onchange="countFund('provincial_invest_','0,3,6,9,12','13');"  />
		</td>
		<td>
			<input type="text" style="width:280px" name="budget/invest_detail/invest[12]/provincial_brief" 
					id="provincial_brief_12" onfocus="InitInput.setMaxLength(this,50)" 
					class="input_css required" label="其它中省科技厅经费用途说明" 
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='12']/provincial_brief" />"/>
		</td>
	</tr>
	<tr class="li_2">
	    <td align="center">
	                      合计
	    </td>
	    <td>
			<input type="hidden" name="budget/invest_detail/invest[13]@invest_code" value="13" />
			<input type="hidden" name="budget/invest_detail/invest[13]/name" value="合计" />
			<input type="text" name="budget/invest_detail/invest[13]/total_invest" id="total_invest_13" 
					style="text-align:right;width:100px"  disabled
					class="required gray" label="合计中总经费经费额" 
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='13']/total_invest" />"  
					onfocus="InitInput.setNumber(this,7,4,4)" />
		</td>
		<td>
			<input type="text" name="budget/invest_detail/invest[13]/total_brief" 
			        style="width:280px"
					id="total_brief_13"  onfocus="InitInput.setMaxLength(this,50)" 
					class="input_css" label="合计中总经费用途说明" 
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='13']/total_brief" />"/>
		</td>
		<td>
			<input type="text" name="budget/invest_detail/invest[13]/provincial_invest" id="provincial_invest_13" 
					style="text-align:right;width:100px" disabled
					class="required gray" label="合计中省科技厅经费经费额" 
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='13']/provincial_invest" />"  
					onfocus="InitInput.setNumber(this,7,4,4)"/>
		</td>
		<td>
			<input type="text" style="width:280px" name="budget/invest_detail/invest[13]/provincial_brief" 
					id="provincial_brief_13" onfocus="InitInput.setMaxLength(this,50)" 
					class="input_css " label="合计中省科技厅经费用途说明" 
					value="<x:out select="$xmlData/data/budget/invest_detail/invest[@invest_code='13']/provincial_brief" />"/>
		</td>
	</tr>
</table>
<script type="text/javascript">
    function displayBrief(id1,id2){
    	if($("#"+id1).val()!=""){
    		if(!$("#"+id2).hasClass("required")){
    			$("#"+id1).addClass("required");
    			$("#"+id2).addClass("required");
    			$("#"+id2).removeClass("gray");
    			$("#"+id2).removeAttr("disabled");
    		}
    	}else{
    		if($("#"+id2).hasClass("required")){
    			$("#"+id1).removeClass("required");
    			$("#"+id2).removeClass("required");
    			$("#"+id2).addClass("gray");
    			$("#"+id2).attr("disabled","disabled");
    			$("#"+id2).val("");
    		}
    	}
    }
    
    $(document).ready (function() {
    	displayBrief('total_invest_1','total_brief_1');
    	displayBrief('provincial_invest_1','provincial_brief_1');
    	displayBrief('total_invest_2','total_brief_2');
    	displayBrief('provincial_invest_2','provincial_brief_2');
    	displayBrief('total_invest_4','total_brief_4');
    	displayBrief('provincial_invest_4','provincial_brief_4');
    	displayBrief('total_invest_5','total_brief_5');
    	displayBrief('provincial_invest_5','provincial_brief_5');
    	displayBrief('total_invest_7','total_brief_7');
    	displayBrief('provincial_invest_7','provincial_brief_7');
    	displayBrief('total_invest_8','total_brief_8');
    	displayBrief('provincial_invest_8','provincial_brief_8');
    	displayBrief('total_invest_10','total_brief_10');
    	displayBrief('provincial_invest_10','provincial_brief_10');
    	displayBrief('total_invest_11','total_brief_11');
    	displayBrief('provincial_invest_11','provincial_brief_11');
    });
    
    function countNum1(idStart, countStr, totalStr) {

		var indexs = countStr.split(",");
		var count = 0;
		for ( var i = 0; i < indexs.length; i++) {
			var fund = $("#" + idStart + indexs[i]).val();
			if (!$.isNumeric(fund))
				fund = "0";
			count = ((parseFloat(count)*10000 + parseFloat(fund)*10000)/10000).toFixed(4);
		}

		count = formatNumber(count.toString(), 9, 4, 4);// 格式化金额
		$("#" + idStart + totalStr).val(count);
	}
</script>
